<?php
require_once '../../global.inc.php';
//SESSION中取出积分资料信息
$memberInfo		= $_SESSION["memberInfo"];
$logScoreArray	= $_SESSION["logScoreArray"];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}

div{margin:0 10px}
.STYLE1  {color: #e1e2e3; font-size: 12px;}
.STYLE6  {color: #000000; font-size: 12px;}
.STYLE10 {color: #000000; font-size: 12px;}
.STYLE19 {color: #344b50; font-size: 12px;}
.STYLE21 {color: #3b6375; font-size: 12px;}
.STYLE22 {color: #295568; font-size: 12px;}

-->
</style>
</head>

<body>
<div align="center"><h3>会员积分构成明细</h3></div>
<form action="" method="post" >
<table align="center" width="80%" border="0" cellpadding="3" cellspacing="1" bgcolor="#a8c7ce">
	<tr>
		<td width="20%" bgcolor="d3eaef" class="STYLE6"><div align="left"><span class="STYLE10">会员积分：</span></div></td>
		<td   bgcolor="#FFFFFF" class="STYLE6"><div align="left"><?php echo $memberInfo["score"]?></div></td>
	</tr>
    <tr><td colspan="2" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10"><font style="font-weight:bold">积分变更流水</font></span></div></td></tr>
     	<?php 
     	foreach ($logScoreArray as $logScore) {
			switch ($logScore["change_type"]) {
				case 1: $change_type_name = "手工调整"; break;
				case 2: $change_type_name = "参与活动"; break;
				case 3: $change_type_name = "推荐新会员"; break;
				case 4: $change_type_name = "换购礼物"; break;
			}
			switch ($logScore["change_method"]) {
				case 0: $change_method_name = "减少"; break;
				case 1: $change_method_name = "增加"; break;
			}
			echo "<tr><td colspan='2' bgcolor='#FFFFFF' class='STYLE6'><div align='left'><span class='STYLE10'>";
			echo "操作员:【".$logScore["user_name"]."】,于【".$logScore["change_date"]."】通过【".$change_type_name."】";
			echo "的方式把【".$memberInfo["member_name"]."】的积分【".$change_method_name."】了【".$logScore["change_score"]."】分,";
			echo "还剩下：【".$logScore["remain_score"]."】分。&nbsp;&nbsp;&nbsp;调整原因是：【".$logScore["change_reason"]."】。";
			echo "</span></div></td></tr>";
     	}
		?>
</table>
</form>
</body>
</html>
